package P5.T9;

import javax.swing.*;
import java.awt.*;

public class MyJFrame9 extends JFrame {
    public MyJFrame9() {
        setTitle("MyJFrame9");
        setSize(500,500);
        setLocationRelativeTo(null);
        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());
        panel.add(new JButton("A"),BorderLayout.NORTH);
        panel.add(new JButton("B"),BorderLayout.SOUTH);
        panel.add(new JButton("C"),BorderLayout.WEST);
        panel.add(new JButton("D"),BorderLayout.EAST);
        panel.add(new JButton("E"),BorderLayout.CENTER);
        add(panel,BorderLayout.CENTER);
        setVisible(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
